<script setup lang="ts">
	import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
	import { system, storage } from '@/utils'
	onLaunch(() => {
	  console.log("App Launch")
	  //#ifdef APP-PLUS
	  //console.log(plus.runtime.isAgreePrivacy())
	  const firstFlag = storage.getLocalStorage('first_flag')
	  if(firstFlag) {
		  uni.switchTab({
		  	url:'/pages/index/index'
		  })
	  }
	  //#endif
	});
	onShow(() => {
	  console.log("App Show")
	  //关闭启动页，跳过加载页闪屏ssss
	  setTimeout(()=>{
	      // #ifdef APP-PLUS 
	      plus.navigator.closeSplashscreen()
	      // #endif
	  }, 1500)
	  system.onNetworkStatusChange()
	  system.getNetworkType()
	  system.updateVersion()
	});
	onHide(() => {
	  console.log("App Hide")
	});
</script>
<style>
	//#ifndef APP-NVUE
	page {
		background-color: #F5F5F5;
	}
	//#endif
</style>
